#ifndef CONNECTION_H
#define CONNECTION_H

#include <QMessageBox>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QDate>

struct edu_class
{
    QDate class_date;
    int men_id,
        room_id,
        group_id,
        class_para;

};

enum {
    WeekTableGroup = 0,
    WeekTableMen = 1,
    WeekTableRoom = 2,
    WeekTableTeacher = 3
};

// table subject
enum {
    subject_id = 0,
    subject_name = 1,
    subject_namefull = 2
};

// view teacher
enum {
    teacher_id = 0,
    teacher_firstname = 1,
    teacher_lastname = 2,
    teacher_secondname = 3,
    teacher_fio = 4,
    teacher_department_id = 5
};

// view room
enum {
    room_num = 0,
    roomtype_id = 1,
    room_about = 2,
    roomtype_name = 3,
    man_fio = 4,
    men_respond_id = 5
};

// view subject
enum {
    ViewPredm_id_predm = 0,
    ViewPredm_id_discip = 1,
    ViewPredm_predm = 2,
    ViewPredm_predm_full = 3,
    ViewPredm_diff = 4,
    ViewPredm_cycle = 5,
    ViewPredm_cod1 = 6,
    ViewPredm_cod2 = 7
};

// view group
enum {
    V_GROUP_group_id = 0,
    V_GROUP_curriculum_id = 1,
    V_GROUP_group_stream = 2,
    V_GROUP_group_year_begin = 3,
    V_GROUP_curriculum_base = 4,
    V_GROUP_curriculum_form = 5,
    V_GROUP_curriculum_budget = 6,
    V_GROUP_speciality_id = 7,
    V_GROUP_group_name = 8
};

//
enum {
    ViewStudent_id_student = 0,
    ViewStudent_id_group = 1,
    ViewStudent_grp = 2,
    ViewStudent_id_group_recrut = 3,
    ViewStudent_date_doc = 4,
    ViewStudent_name = 5,
    ViewStudent_surname = 6,
    ViewStudent_surname2 = 7,
    ViewStudent_oth = 8,
    ViewStudent_passport = 9,
    ViewStudent_sex = 10,
    ViewStudent_birth = 11,
    ViewStudent_privilege = 12,
    ViewStudent_sity_pr = 13,
    ViewStudent_adres_pr = 14,
    ViewStudent_tel_pr = 15,
    ViewStudent_index_pr = 16,
    ViewStudent_adres_f = 17,
    ViewStudent_tel_f = 18,
    ViewStudent_index_f = 19,
    ViewStudent_pension = 20,
    ViewStudent_school = 21,
    ViewStudent_base_school = 22,
    ViewStudent_ball = 23,
    ViewStudent_mark1 = 24,
    ViewStudent_mark2 = 25,
    ViewStudent_uge = 26,
    ViewStudent_kursi = 27,
    ViewStudent_recrut = 28,
    ViewStudent_state = 29,
    ViewStudent_fam_io = 30
};

#endif
